OpenCities Map Help

PostgreSQL Client Requirements

Refer to Supported Spatial Databases.

PostgreSQL uses a client/server model. A PostgreSQL session consists of the following cooperating programs:

  • A server process, which manages the database files, accepts connections to the database from client applications and performs database actions on behalf of the clients. The database server program is called Postgres.
  • The client application that requires database operations. Client applications can be very diverse in nature: a client could be a text-oriented tool, a graphical application, a web server that accesses the database to display web pages, or a specialized database maintenance tool. Some client applications are supplied with the PostgreSQL distribution; most are developed by users.

As is typical of client/server applications, the client and the server can be on different hosts. In that case, they communicate over a TCP/IP network connection. This should be kept in mind since files that can be accessed on a client machine might not be accessible on the database server machine.  For more information, on the architecture fundamentals, please refer to PostgreSQL Documentation : https://www.postgresql.org/docs

 

By default, a PostgreSQL database only allows connections from the local server. In order to allow remote connections for applications such as OpenCities Map, you will need to edit the pg_hba.conf file (host based authentication). The default location of this file on your server machine is: C:\Program Files\PostgreSQL\<PostgreSQL version>\data.

The entries placed in a pg_hba.conf file will vary for each user scenario. For a full explanation of how to alter this file for your requirements, please see the PostgreSQL documentation.

A text editor is all you need to edit this configuration file. Each record specifies a connection type, a client IP address range (if relevant for the connection type), a database name, a username, and the authentication method to be used for connections matching these parameters. In the following example, all machines connecting from bentley.com are allowed access to the PostgreSQL database:

Type Database User Address Method
Host all all .bentley.com md5